package com.example.sxmall.controller;

import com.example.sxmall.service.LoginService;
import com.example.sxmall.vo.Result;
import com.example.sxmall.vo.params.loginParams;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("api")
public class LoginController {
    @Autowired
    private LoginService loginService;

    @PostMapping("login")
    public Result login(@RequestBody loginParams loginParams) {
        return loginService.login(loginParams);
    }
}
